This might cause a crash when cleaning up the cache as the hash table has
cogl_object_unref as DestroyNotify function but that assumes that
the passed object is a valid CoglObject.
Fixes: #210
goto out;
texdata = pixbuf_to_cogl_texture (pixbuf);
+ if (!texdata)
+ goto out;
if (data->policy != ST_TEXTURE_CACHE_POLICY_NONE)
{
texdata = pixbuf_to_cogl_texture (pixbuf);
g_object_unref (pixbuf);
+ if (!texdata)
+ goto out;
+
if (policy == ST_TEXTURE_CACHE_POLICY_FOREVER)
{
cogl_object_ref (texdata);